Skip to content

Honor parameter information setting for signature help - #8581

Merged
Stella Huang (StellaHuang95) merged 1 commit into
mainfrom
fix/8580-parameter-information
Jul 21, 2026
Merged

Honor parameter information setting for signature help#8581
Stella Huang (StellaHuang95) merged 1 commit into
mainfrom
fix/8580-parameter-information

Conversation

@StellaHuang95

Copy link
Copy Markdown
Contributor

Context

PTVS historically honored Visual Studio's LANGPREFERENCES.fAutoListParams value before starting parameter information. After signature help moved to the Visual Studio LSP client and Pylance, automatic sessions were instead driven directly by Pylance's advertised trigger characters. As a result, disabling Parameter information no longer affected Python signature help.

The stock Statement completion group was later hidden because its other settings are not supported by the current LSP-based experience, so this change exposes only the setting that is now supported.

Fixes #8580

Changes

  • Add Parameter information to Text Editor > Python > Advanced.
  • Persist the option through the existing Python LANGPREFERENCES2.fAutoListParams value, preserving existing user preferences and Visual Studio settings behavior.
  • Add a Python language-client middle layer for textDocument/signatureHelp requests.
  • Suppress only unambiguous initial automatic requests (TriggerCharacter or ContentChange) when the option is disabled.
  • Continue forwarding explicit Edit > IntelliSense > Parameter Info invocations, active-session updates, and retriggers.
  • Fail open for missing, malformed, or future request context shapes so ambiguous requests retain the existing behavior.
  • Publish live preference changes safely to LSP request threads through the existing LanguagePreferences service.
  • Use the current generic middle-layer API on VS 18 and the compatible legacy API on VS 17.

Behavior and compatibility

When the option is enabled, signature help behaves exactly as before. Disabling it prevents new automatic popups without disabling the explicit Parameter Info command or interrupting an already active session.

The middle layer handles only textDocument/signatureHelp; completion, hover, diagnostics, navigation, formatting, and other LSP features are unaffected. Pylance capabilities and configuration are unchanged.

ShowCompletion remains disabled, so this does not reintroduce the unsupported stock Auto list members and Hide advanced members controls.

Validation

  • Full Debug18 Python traversal build: succeeded with 0 warnings and 0 errors.
  • Focused Debug18 PythonTools.csproj rebuild: succeeded with 0 warnings and 0 errors.
  • VS 17 compatibility compile: completed with 0 errors when pre-existing warnings were not promoted to errors.
  • Final editor diagnostics and git diff --check: clean.

Automated tests are not included in this change.

Add a Python editor option backed by fAutoListParams and filter automatic LSP signature-help requests while preserving manual invocation and active-session retriggers.
@StellaHuang95
Stella Huang (StellaHuang95) requested a review from a team as a code owner July 21, 2026 22:18
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@heejaechang

Copy link
Copy Markdown

🔒 Automated review in progress — Heejae Chang (@heejaechang) is auto-reviewing this PR.

@sonarqubecloud

Copy link
Copy Markdown

@StellaHuang95

Copy link
Copy Markdown
Contributor Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

}

return triggerKind == (int)SignatureHelpTriggerKind.TriggerCharacter ||
triggerKind == (int)SignatureHelpTriggerKind.ContentChange;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add focused regression coverage for the signature-help suppression matrix. This predicate has several fail-open branches, and tests should distinguish disabled preferences for new automatic TriggerCharacter/ContentChange requests from explicit invocations, retriggers, active sessions, malformed contexts, and unavailable preferences.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved via Review Center.

@StellaHuang95
Stella Huang (StellaHuang95) merged commit 694133f into main Jul 21, 2026
11 checks passed
@StellaHuang95
Stella Huang (StellaHuang95) deleted the fix/8580-parameter-information branch July 21, 2026 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support "Parameter information" setting to turn off signature help.

2 participants